Find the gradient of $f(x, y) = \cos^2(y) - \sin^2(x)$. $\nabla f = ($ $,$ $)$
Solution: The gradient of a scalar field is all its partial derivatives put together into a vector. For a 2D scalar field, this looks like $\nabla f = (f_x, f_y)$. Let's find $f_x$ and $f_y$. $\begin{aligned} f_x &= \dfrac{\partial}{\partial x} \left[ \cos^2(y) - \sin^2(x) \right] \\ \\ &= -2 \sin(x) (\cos x) \\ \\ f_y &= \dfrac{\partial}{\partial y} \left[ \cos^2(y) - \sin^2(x) \right] \\ \\ &= 2 \cos(y) (-\sin y) \\ \\ \end{aligned}$ The gradient of $f$ is: $\nabla f = \left( -2\sin(x)\cos(x), -2\sin(y)\cos(y) \right)$